﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ZDSoft.LMS.Domain;
using NHibernate.Criterion;

namespace ZDSoft.LMS.Service
{
    public interface IDriverService
    {  /// <summary>
        /// 新建
        /// </summary>
        /// <param name="entity">实体名</param>
        void Create(Driver entity);

        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="entity">实体名</param>
        void Update(Driver entity);

        /// <summary>
        /// 根据ID获取
        /// </summary>
        /// <param name="ID">ID编号</param>
        /// <returns>ID</returns>
        Driver Get(int ID);

        /// <summary>
        /// 根据ID删除
        /// </summary>
        /// <param name="ID">ID</param>
        void Delete(int ID);

        /// <summary>
        /// 根据实体删除
        /// </summary>
        /// <param name="entity">删除</param>
        void Delete(Driver entity);

        /// <summary>
        /// 获取所有
        /// </summary>
        /// <returns></returns>
        IList<Driver> GetAll();

        /// <summary>
        /// 获取满足条件的记录
        /// </summary>
        /// <param name="queryConditions">条件</param>
        /// <returns></returns>
        IList<Driver> GetAll(IList<ICriterion> queryConditions);

        /// <summary>
        /// 分页获取满足条件的记录
        /// </summary>
        /// <param name="queryConditions">条件</param>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">每页显示数量</param>
        /// <param name="orderField"></param>
        /// <param name="isAscending">升序 true,降序 false</param>
        /// <param name="count">数量集合数量</param>
        /// <returns></returns>
        IList<Driver> GetPaged(IList<ICriterion> queryConditions, IList<Order> orderList, int pageIndex, int pageSize, out int count);
    }
}
